package my.study.java.util.TimeZone;

import java.util.TimeZone;

public class Example1 {

	/**
	 * TimeZone代表一个时区
	 * @param args
	 */
	public static void main(String[] args) {
		p("TimeZone.getAvailableIDs()");
		for (String zoneID: TimeZone.getAvailableIDs()) {
			p(zoneID);
		}
		p("TimeZone.getAvailableIDs(1)");
		for (String zoneID: TimeZone.getAvailableIDs(1)) {
			p(zoneID);
		}
		TimeZone myZone = TimeZone.getDefault();
		printZoneInfo(myZone);
		

	}
	private static void printZoneInfo(TimeZone zone) {
		//
		p("zone.getDisplayName():" + zone.getDisplayName());
		p("zone.getID():" + zone.getID());
		//the amount of time to be added to local standard time to get local wall clock time.
		p("获取夏时制Daylight Saving Time: zone.getDSTSavings()" + zone.getDSTSavings());
		p("获取标准时间的偏移毫秒数：zone.getRawOffset():" + zone.getRawOffset());
		
	}
	private static void p(Object o) {
		System.out.println(o);
	}
}
